import request from '@/utils/request'

export default{
    // 获取所有车组车辆状态
    totalData(token){
        return request({
            url: `/monitor/totalCarState/${token}`,
            method: 'get'
        })
    },

    // 获取在线车组车辆状态
    onlineData(token){
        return request({
            url: `/monitor/onlineCarState/${token}`,
            method: 'get'
        })
    },

    // 获取离线车组车辆状态
    offlineData(token){
        return request({
            url: `/monitor/offlineCarState/${token}`,
            method: 'get'
        })
    },

    // 获取选中车辆实时状态
    realTimeData(arr){
        return request({
            url: '/monitor/realTime',
            method: 'post',
            data: arr
        })
    },

    // 获取报警信息
    alertMessage(token){
        return request({
            url: `/monitor/alertMessage/${token}`,
            method: 'get'
        })
    },

    // 获取选择车辆
    carDetail(id){
        return request({
            url: `/monitor/carDetail/${id}`,
            method: 'get'
        })
    },

    // 下发文本指令
    issueOrder(form){
        return request({
            url: '/monitor/issueOrder',
            method: 'post',
            data: form
        })
    }
}